package com.xiaoyun.rollutil.entity.bo;

import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Author: xiaoyun461
 * @Date: 2021/12/1 18:53
 */
@Data
public class ApiModelBO<T> implements Serializable {

    public final static Integer SUCCESS_CODE = 1;

    public final static Integer ERROR_CODE = 0;

    private Integer code;
    private String msg;
    private T data;

    public final boolean isSuccess() {
        return Objects.equals(code, SUCCESS_CODE);
    }


}
